import axiosInstance from "@/api";
import {getToken} from "@/util";

export async function useAddGroup(code: string, userId: number) {
    const token = getToken()
    return await axiosInstance.post<any, { code: number, msg: string, data: any }>("/v1/group/member/join", {
        user_id: userId,
        invitation_code: code
    }, {
        headers: {
            "x-token": token
        }
    })
}